package com.zusmart.core.config.support;

import com.zusmart.core.config.ConfigDataConverter;

public abstract class AbstractConfigDataConverter<T> implements ConfigDataConverter<T> {

	@Override
	public T convert(String value) {
		if (null == value) {
			return null;
		}
		try {
			return this.doConvert(value);
		} catch (Exception e) {
			return null;
		}
	}

	protected abstract T doConvert(String value) throws Exception;

}